home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 26 / CU Amiga Magazine's Super CD-ROM 26 (1998)(EMAP Images)(GB)[!][issue 1998-09].iso / NetConnect2 / NC2-Install < prev    next >
Text File  |  1998-07-21  |  29KB  |  910 lines

  1. ; NETCONNECT 2 Install Script
  2. ; $VER: NetConnect2 Installer v2.02 (29-Jun-98)
  3. ;
  4. ; Copyright © 1998 Active Technologies
  5. ; http://www.active-net.co.uk
  6. ;
  7. ; Install script by Ben Preece <beej@bigfoot.com> (v 1.0)
  8. ;        and Michael Neuweiler <dolphin@unizh.ch> (v 2.0)
  9. ;
  10. ; Piracy and unlawful duplication of this package may result in
  11. ; criminal prosecution to the full extent of UK and European law.
  12.  
  13. ; added for CUCD distribution
  14. (makeassign 'NETCD2' 'CUCD26:NetConnect2')
  15.  
  16. (set @app-name "NetConnect 2")
  17. (set #error-msg "An unexpected error has occured. Installation aborted.")
  18.  
  19. (message "\n"
  20.          "Welcome to the " @app-name " installer.\n"
  21.          "\n"
  22.          "\n"
  23.          "© Active Technologies 1998\n"
  24.          "\n"
  25.          "http://www.active-net.co.uk\n"
  26.          "\n"
  27.          "\n"
  28.          "\n"
  29.          "Piracy and unlawful duplication of this package may result in "
  30.          "criminal prosecution to the full extent of UK and European law."
  31. )
  32.  
  33.  
  34.  
  35. ; Main component names & def pattern
  36. (set #amitcp-name   "AmiTCP-Genesis v2.2")
  37. (set #dock-name     "NetConnect 2 dock")
  38. (set #nc2progs-name "NetConnect 2 programs")
  39. (set #nc2docs-name  "NetConnect 2 documentation")
  40. (set #mui-name      "Magic User Interface v3.8")
  41. (set #nc2-choice 31)
  42.  
  43. ; NetConnect programs & def pattern
  44. (set #md2-name      "MicroDot-II v1.0")
  45. (set #vng-name      "Voyager-NG v2.96")
  46. (set #amftp-name    "AmFTP v1.92")
  47. (set #amirc-name    "AmIRC v2.0")
  48. (set #amtalk-name   "AmTalk v1.9")
  49. (set #amtelnet-name "AmTelnet v1.10")
  50. (set #netinfo-name  "NetInfo v1.4")
  51. (set #amterm-name   "AmTerm v1.5")
  52. (set #xarc-name     "X-Arc v1.1")
  53. (set #cm-name       "Contact Manager v1.0")
  54. (set #mime-name     "MIMEprefs v0.8")
  55. (set #nc2progs-choice 2047)
  56.  
  57. ; main NC2 dirs
  58. (set #source-dir        "NETCD2:")
  59. (set #nc2data-dir       "Data")
  60. (set #nc2docs-dir       "Docs")
  61. (set #env-dir           "ENV")
  62. (set #fonts-dir         "Fonts")
  63. (set #l-dir             "L")
  64. (set #libs-dir          "Libs")
  65. (set #mime-dir          "MIME")
  66. (set #prefs-dir         "Prefs")
  67. (set #programs-dir      "Programs")
  68. (set #devs-net-dir      "Devs/Networks")
  69.  
  70. ; program dirs
  71. (set #md2-dir           "MicroDot-II")
  72. (set #vng-dir           "Voyager")
  73. (set #amftp-dir         "AmFTP")
  74. (set #amirc-dir         "AmIRC")
  75. (set #amtalk-dir        "AmTalk")
  76. (set #amtelnet-dir      "AmTelnet")
  77. (set #netinfo-dir       "NetInfo")
  78. (set #amterm-dir        "AmTerm")
  79. (set #cm-dir            "CManager")
  80. (set #xarc-dir          "X-Arc")
  81.  
  82. ; NetConnect Components
  83. (set #nc-name           "NetConnect")
  84. (set #nc-prefs-name     "NetConnectPrefs")
  85. (set #nc-config-name    "NC2.prefs")
  86. (set #mime-prefs-name   "MIME.prefs")
  87. (set #xarc-arctype-name "X-Arc.ArchiveTypes")
  88. (set #xarc-config-name  "X-Arc.config")
  89. (set #xarc-filetype-name "X-Arc.FileTypes")
  90. (set #cmanager-path-name "CManager_path")
  91.  
  92. ; old MD-II components
  93. (set #oldmd2-dir        (if (getenv "Vapor/MD2_LASTUSEDDIR") (getenv "Vapor/MD2_LASTUSEDDIR") "SYS:"))
  94. (set #md2book-name      "MicroDot.Addressbook")
  95. (set #md2config-name    "MicroDot.prefs")
  96.  
  97. ; old V components
  98. (set #oldv-dir          (if (getenv "Vapor/MD2_LASTUSEDDIR") (getenv "Vapor/Voyager_LASTUSEDDIR") "SYS:"))
  99. (set #vbook-name        "Bookmarks.HTML")
  100.  
  101. ; old AmIRC components
  102. (set #oldamirc-dir      (if (getenv "Vapor/AmIRC_LASTUSEDDIR") (getenv "Vapor/AmIRC_LASTUSEDDIR") "SYS:"))
  103. (set #amircprefs-name   "Default.AmIRCfg")
  104.  
  105. ; name for assign
  106. (set #nc2-dir           "NetConnect2")
  107. (set #nc2-assign        "NetConnect2:")
  108. (set #nc-dir            "NetConnect")
  109. (set #nc-assign         "NetConnect:")
  110. (set #amitcp-dir        "AmiTCP")
  111. (set #amitcp-assign     "AmiTCP:")
  112. (set #mui-dir           "MUI")
  113. (set #mui-assign        "MUI:")
  114.  
  115.  
  116. (welcome)
  117.  
  118. (onerror
  119.  (if #old-amitcp-dir
  120.      (makeassign #amitcp-dir #old-amitcp-dir))
  121.  (if #old-mui-dir
  122.      (makeassign #mui-dir #old-mui-dir))
  123. )
  124.  
  125.  
  126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  127. (procedure check-system-version
  128.  
  129.   (transcript "checking system version")
  130.   (if (< (/ (getversion) 65536) 39)
  131.       (exit "\n\n" @app-name " requires Kickstart version 3.0 or above.\n\n\n"
  132.             "Installation aborted.\n\n"
  133.             (quiet)
  134.       )
  135.   )
  136. )
  137.  
  138.  
  139. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  140. (procedure check-old-assign
  141.  
  142.    (transcript "Checking for old version of NetConnect.")
  143.    (set #old-nc-dir
  144.       (if (exists #nc-assign (noreq))
  145.          (getassign #nc-dir)
  146.          "")
  147.    )
  148.    (if #old-nc-dir
  149.    (
  150.       (transcript "Existing NetConnect detected at directory " #old-nc-dir ".")
  151.       (set #old-md2-dir    "NetConnect:Programs/MicroDot-II/")
  152.       (set #old-v-dir      "NetConnect:Programs/Voyager/")
  153.       (set #old-amirc-dir  "NetConnect:Programs/AmIRC/")
  154.    ))
  155.  
  156.  
  157.    (transcript "Checking for already installed AmiTCP.")
  158.    (set #old-amitcp-dir
  159.       (if (exists #amitcp-assign (noreq))
  160.          (getassign #amitcp-dir)
  161.          "")
  162.    )
  163.    (if #old-amitcp-dir
  164.       (transcript "Existing AmiTCP detected at directory " #old-amitcp-dir "."))
  165.  
  166.  
  167.    (transcript "Checking for already installed MUI.")
  168.    (set #old-mui-dir
  169.       (if (exists #mui-assign (noreq))
  170.          (getassign #mui-dir)
  171.          "")
  172.    )
  173.    (if #old-mui-dir
  174.       (transcript "Existing MUI detected at directory " #old-mui-dir "."))
  175. )
  176.  
  177.  
  178. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  179. (procedure ask-install
  180.  
  181.    (set #nc2-choice
  182.       (askoptions
  183.          (prompt "Please select which parts of the " @app-name " package you wish to install.")
  184.          (help "There are several parts to the " @app-name " package, some of which you may or may not wish to install. "
  185.                "Many of the parts are unique to this release, so if you have not installed any of these already you should select them all.")
  186.          (choices (cat #amitcp-name " (TCP/IP stack)")
  187.                   (cat #dock-name " (NetConnect launcher)")
  188.                   (cat #nc2progs-name " (Voyager, X-Arc, etc.)")
  189.                   (cat #nc2docs-name " (Help and info)")
  190.                   (cat #mui-name " (Graphical interface)")
  191.          )
  192.          (default #nc2-choice)
  193.       )
  194.    )
  195.  
  196.    (if (= 0 #nc2-choice)
  197.       (exit "\n\n\n\nNo " @app-name " components have been selected.\n"
  198.             "Installation aborted.\n" (quiet))
  199.    )
  200. )
  201.  
  202.  
  203. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  204. (procedure ask-prg-install
  205.  
  206.    (set #nc2progs-choice
  207.       (askoptions
  208.          (prompt "Please select which " @app-name " component programs you wish to install.")
  209.          (help "There are several programs within the " @app-name " package, some of which you may or may not wish to install. "
  210.                "Many are fully-functional release versions of popular internet programs, and some are exclusive to " @app-name ". "
  211.                "If you have not installed any of these already you should select them all.")
  212.          (choices (cat #md2-name      " (E-Mail/News)")
  213.                   (cat #vng-name      " (WWW browser)")
  214.                   (cat #amftp-name    " (FTP client)")
  215.                   (cat #amirc-name    " (IRC client)")
  216.                   (cat #amtalk-name   " (Talk/Chat program)")
  217.                   (cat #amtelnet-name " (Telnet client)")
  218.                   (cat #netinfo-name  " (Internet tools)")
  219.                   (cat #amterm-name   " (Terminal program)")
  220.                   (cat #xarc-name     " (Archive manager)")
  221.                   (cat #cm-name       " (System address book)")
  222.                   (cat #mime-name     " (MIME-type preferences)")
  223.          )
  224.          (default #nc2progs-choice)
  225.       )
  226.    )
  227. )
  228.  
  229.  
  230. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  231. (procedure ask-dst-dir
  232.  
  233.    (if (exists "Internet:" (noreq))
  234.       (set @default-dest "Internet:")
  235.       (if (exists "Work:" (noreq))
  236.          (set @default-dest "Work:")
  237.          (set @default-dest "SYS:")
  238.       )
  239.    )
  240.  
  241.    (set @default-dest
  242.       (tackon
  243.          (askdir
  244.             (prompt "Please select where you would like " @app-name " installed. "
  245.                     "A drawer called '" #nc2-dir "' will be created there.")
  246.             (help "Select where you would like " @app-name " installed."
  247.                   "The installer will then create a drawer called '" #nc2-dir "', "
  248.                   "and copy the programs and documentation into it.")
  249.             (default @default-dest)
  250.             (newpath)
  251.          )
  252.          #nc2-dir
  253.       )
  254.    )
  255.  
  256.    (if (NOT (exists @default-dest))
  257.       (makedir @default-dest (infos))
  258.    )
  259. )
  260.  
  261.  
  262. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  263. (procedure add-nc2-assign
  264.  
  265.    (transcript "creating netconnect2: assign")
  266.    (set uus::commands (cat "assign " #nc2-assign " \"" (expandpath @default-dest) "\"\n"))
  267.    (set uus::section "NetConnect")
  268.    (update-user-startup)
  269.  
  270.    (makeassign #nc2-dir (expandpath @default-dest))
  271. )
  272.  
  273.  
  274. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  275. (procedure check-cpu-type
  276.  
  277.    (transcript "checking CPU type")
  278.    (set #cpu-type (database "cpu"))
  279.    (if (= #cpu-type "68060")
  280.       (set #cpu-choice 4)
  281.       (if (= #cpu-type "68040")
  282.          (set #cpu-choice 3)
  283.          (if (= #cpu-type "68030")
  284.             (set #cpu-choice 2)
  285.             (if (= #cpu-type "68020")
  286.                (set #cpu-choice 1)
  287.                (set #cpu-choice 0)
  288.             )
  289.          )
  290.       )
  291.    )
  292.  
  293.    (set #cpu-choice
  294.       (askchoice
  295.          (choices "68000" "68020" "68030" "68040" "68060")
  296.          (prompt "Please select which CPU " @app-name " will be running on.")
  297.          (help "Some parts of the " @app-name " package have been optimised for specific members of the 68000 processor family. "
  298.                "You should select the processor that " @app-name " will be running on so that the most appropriate programs will be used.")
  299.          (default #cpu-choice)
  300.       )
  301.    )
  302. )
  303.  
  304.  
  305. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  306. ;;
  307. ;; arguments:
  308. ;;
  309. ;; uus::commands - commands to add
  310. ;; uus::section  - section name
  311. ;;
  312. (procedure update-user-startup
  313.  
  314.    (set uus::complete (cat ";BEGIN " uus::section "\n"
  315.       uus::commands
  316.       ";END " uus::section "\n"))
  317.  
  318.    (set startup-changed 1)
  319.    (startup
  320.       uus::section
  321.       (command uus::commands)
  322.       (prompt "Installer will modify your S:User-Startup file. "
  323.               "Following lines will be appended to it:\n\n"
  324.               uus::complete)
  325.       (help "   Installer needs to make indicated modifications to your user startup file.\n"
  326.             "   You should make modifications later by hand if you skip this part.")
  327.    )
  328. )
  329.  
  330.  
  331. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  332. (procedure install-amitcp
  333.  
  334.    (transcript "installing amitcp")
  335.    (if (NOT (exists (tackon @default-dest #amitcp-dir)))
  336.       (makedir (tackon @default-dest #amitcp-dir) (infos))
  337.    )
  338.  
  339.    (copyfiles
  340.       (source #source-dir)
  341.       (dest @default-dest)
  342.       (choices "AmiTCP.info")
  343.       (infos)
  344.    )
  345.  
  346.    (set #amitcp-source-dir (tackon #source-dir #amitcp-dir))
  347.  
  348.    (copyfiles
  349.       (source #amitcp-source-dir)
  350.       (dest (tackon @default-dest #amitcp-dir))
  351.       (all)
  352.    )
  353.  
  354.    (if (NOT (exists "DEVS:Networks"))
  355.       (makedir "DEVS:Networks")
  356.    )
  357.    (copyfiles
  358.       (source #devs-net-dir)
  359.       (dest "DEVS:Networks/")
  360.       (choices "aslip.device")
  361.    )
  362.  
  363.    (if (= 0 #cpu-choice) (set #appp-name "appp.device"))
  364.    (if (= 1 #cpu-choice) (set #appp-name "appp.device020"))
  365.    (if (= 2 #cpu-choice) (set #appp-name "appp.device030"))
  366.    (if (= 3 #cpu-choice) (set #appp-name "appp.device040"))
  367.    (if (= 4 #cpu-choice) (set #appp-name "appp.device060"))
  368.  
  369.    (copyfiles
  370.       (source (tackon #devs-net-dir #appp-name))
  371.       (dest "DEVS:Networks/")
  372.       (newname "appp.device")
  373.    )
  374.  
  375.    (set uus::commands (cat "Assign " #amitcp-assign " \"" (expandpath (tackon @default-dest #amitcp-dir)) "\"\n"
  376.                            "path " (tackon #amitcp-assign "bin") " add\n"
  377.                            "Assign APIPE: Exists > NIL:\n"
  378.                            "IF Warn\n"
  379.                            "  Mount APIPE: from " (tackon #amitcp-assign "devs/APipe-Mountlist") "\n"
  380.                            "EndIf\n"))
  381.    (set uus::section "AmiTCP/IP")
  382.    (update-user-startup)
  383.  
  384.    (makeassign #amitcp-dir (expandpath (tackon @default-dest #amitcp-dir)))
  385. )
  386.  
  387.  
  388. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  389. (procedure install-mui
  390.  
  391.    (transcript "installing mui")
  392.    (set #mui-dest
  393.       (askdir
  394.          (prompt "Please select where you would like " #mui-name " installed. "
  395.                  "A drawer called '" #mui-dir "' will be created there.")
  396.          (help "Select where you would like " @mui-name " installed. "
  397.                "The installer will then create a drawer called '" #mui-dir "', "
  398.                "and copy the required programs and documentation into it.")
  399.          (default "SYS:")
  400.          (newpath)
  401.       )
  402.    )
  403.  
  404.    (copyfiles
  405.       (source #source-dir)
  406.       (dest #mui-dest)
  407.       (choices #mui-dir)
  408.       (infos)
  409.    )
  410.  
  411.    (set uus::commands (cat "Assign " #mui-assign " \"" (expandpath (tackon #mui-dest #mui-dir)) "\"\n"
  412.                            "Assign LIBS: \"" (tackon #mui-assign "Libs") "\" ADD\n"
  413.                            "Assign LOCALE: \"" (tackon #mui-assign "Locale") "\" ADD\n"))
  414.    (set uus::section "MUI")
  415.    (update-user-startup)
  416.  
  417.    (makeassign #mui-dir (expandpath (tackon #mui-dest #mui-dir)))
  418.    (set mui-script "t:mui-script")
  419.    (textfile
  420.       (dest mui-script)
  421.       (append "assign LIBS: " (tackon #mui-assign "Libs") " ADD\n"
  422.               "assign LOCALE: " (tackon #mui-assign "Locale") " ADD\n")
  423.       (safe))
  424.    (protect mui-script "+s +e")
  425.    (execute mui-script)
  426. )
  427.  
  428.  
  429. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  430. (procedure install-mcc
  431.  
  432.    (transcript "installing mui mcc")
  433.    (if (= 2 (exists "MUI:libs/MUI/" (noreq)))
  434.    (
  435.       (transcript "found existing MUI:libs/MUI dir")
  436.       (set #mcc-source-dir (tackon #source-dir "MUI/libs/MUI/"))
  437.       (foreach #mcc-source-dir "#?"
  438.       (
  439.          (copylib
  440.             (prompt "Installing " @each-name)
  441.             (confirm)
  442.             (help @copylib-help)
  443.             (source (tackon #mcc-source-dir @each-name))
  444.             (dest "MUI:libs/mui/")
  445.             (optional "askuser" "force")
  446.          )
  447.       ))
  448.    ))
  449. )
  450.  
  451.  
  452. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  453. (procedure install-nc-dock
  454.  
  455.    (transcript "installing NetConnect dock")
  456.    (copyfiles
  457.       (source #source-dir)
  458.       (dest @default-dest)
  459.       (choices #nc-name #nc-prefs-name)
  460.       (infos)
  461.    )
  462.  
  463.    (copyfiles
  464.       (source #source-dir)
  465.       (dest @default-dest)
  466.       (choices #nc2data-dir)
  467.       (infos)
  468.    )
  469.  
  470.    (if (NOT (exists (tackon "envarc:" #nc-config-name)))
  471.    (
  472.       (copyfiles
  473.         (source (tackon #source-dir #env-dir))
  474.         (dest "envarc:")
  475.         (choices #nc-config-name)
  476.       )
  477.       (copyfiles
  478.         (source (tackon #source-dir #env-dir))
  479.         (dest "env:")
  480.         (choices #nc-config-name)
  481.       )
  482.    ))
  483.  
  484.    (if (= 1 (askbool
  485.       (prompt "\nIf you would like " #dock-name " to be started every time Workbench is loaded, the " #dock-name " can be copied to your startup drawer.\n\n\n"
  486.               "Would you like the " #dock-name " to be added to your Workbench startup?\n")
  487.       (help "If you would like the " #dock-name " to run automatically when Workbench is loaded, it will be copied into your startup drawer.")
  488.       (default 1)))
  489.    (
  490.       (copyfiles
  491.          (source #source-dir)
  492.          (dest "SYS:WBStartup")
  493.          (infos)
  494.          (choices #nc-name)
  495.       )
  496.    ))
  497. )
  498.  
  499.  
  500. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  501. (procedure install-misc
  502.  
  503.    (transcript "installing misc stuff")
  504.    (copyfiles
  505.       (source (tackon #source-dir #fonts-dir))
  506.       (dest "FONTS:")
  507.       (all)
  508.    )
  509.  
  510.    (copyfiles
  511.       (source (tackon #source-dir #l-dir))
  512.       (dest "L:")
  513.       (all)
  514.    )
  515.  
  516.    (if (NOT (exists (tackon @default-dest #mime-dir)))
  517.    (
  518.       (copyfiles
  519.          (source #source-dir)
  520.          (dest @default-dest)
  521.          (choices #mime-dir)
  522.          (infos)
  523.       )
  524.    ))
  525.  
  526.    (foreach (tackon #source-dir #libs-dir) "#?"
  527.    (
  528.       (copylib
  529.          (prompt "Installing " @each-name)
  530.          (help @copylib-help)
  531.          (source (tackon (tackon #source-dir #libs-dir) @each-name))
  532.          (dest "Libs:")
  533.          (confirm)
  534.       )
  535.    ))
  536. )
  537.  
  538.  
  539. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  540. (procedure install-nc-programs
  541.  
  542.    (transcript "installing nc programs")
  543.    (if (NOT (exists (tackon @default-dest "Programs/")))
  544.       (makedir (tackon @default-dest "Programs/") (infos))
  545.    )
  546.  
  547.    (copyfiles
  548.       (source #source-dir)
  549.       (dest @default-dest)
  550.       (choices "Programs.info")
  551.       (infos)
  552.    )
  553.  
  554.    (ask-prg-install)
  555.     
  556.    ; MD2 install
  557.    (if (IN #nc2progs-choice 00)
  558.    (
  559.       (copyfiles
  560.          (source (tackon #source-dir #programs-dir))
  561.          (dest (tackon @default-dest #programs-dir))
  562.          (choices #md2-dir (cat #md2-dir ".info"))
  563.          (infos)
  564.       )
  565.       (if (NOT (exists (tackon (tackon (tackon @default-dest #programs-dir) #md2-dir) "Data")))
  566.          (makedir (tackon (tackon (tackon @default-dest #programs-dir) #md2-dir) "Data"))
  567.       )
  568.  
  569.       ;duplicate old MD2
  570.       (if (= 1 (askbool
  571.          (prompt "\nAs this is a new install of " #md2-dir ", its database of messages will be empty.\n"
  572.                  "If you already use " #md2-dir " then you may wish to import your existing e-mail and news database into this new version.\n"
  573.                  "\n\n\nWould you like to duplicate an existing " #md2-dir " database?\n")
  574.          (help "If you have already installed and used " #md2-dir " then you will already have a database made up of your e-mail and news messages."
  575.                "This database is compatible with this new installation of " #md2-dir ", so unless you want to forget your old messages you should allow them to be duplicated for the new version.\n")
  576.          (default 1)))
  577.       (
  578.          (set #oldmd2-choice (askoptions
  579.             (prompt "\nPlease select which " #md2-dir " components you would like duplicated.\n")
  580.             (help "You may wish to duplicate your existing Address Book or message database for the new installation."
  581.                   "All database components should be selected if you would like it to duplicate correctly."
  582.                   "An existing preferences file cannot be copied due to version incompatibilities.\n")
  583.             (choices (cat #md2book-name  " (Address Book)") "Message database")
  584.             (default 3))
  585.          )
  586.          ;copy address book & config
  587.          (if (OR (IN #oldmd2-choice 00) (IN #oldmd2-choice 01))
  588.          (
  589.             (set #oldmd2-dir (askdir
  590.                (prompt "Please select the drawer where your existing " #md2-dir " can be found.")
  591.                (help "Find and enter the drawer of an existing installation of " #md2-dir ". "
  592.                      "You have to enter the directory where the application " #md2-dir "itself is stored in.")
  593.                (default #oldmd2-dir))
  594.             )
  595.             (if (IN #oldmd2-choice 00)
  596.             (
  597.                (if (exists (tackon #oldmd2-dir #md2book-name))
  598.                (
  599.                   (copyfiles
  600.                      (source #oldmd2-dir)
  601.                      (dest (tackon (tackon @default-dest #programs-dir) #md2-dir))
  602.                      (choices #md2book-name)
  603.                   )
  604.                ))
  605.             ))
  606.          ))
  607.          ; copy database
  608.          (if (IN #oldmd2-choice 01)
  609.          (
  610.             (set #oldmd2db-dir (tackon #oldmd2-dir "Data"))
  611.             (set #oldmd2db-dir (askdir
  612.                (prompt "Please select where your " #md2-dir " data is beeing stored."
  613.                (help   "Enter the drawer where the 'DBX_' directories can be found.")
  614.                (default #oldmd2db-dir)))
  615.             )
  616.             (if (exists #oldmd2db-dir)
  617.                (copyfiles
  618.                   (source #oldmd2db-dir)
  619.                   (dest (tackon (tackon (tackon @default-dest #programs-dir) #md2-dir) "Data"))
  620.                   (all)
  621.                )
  622.             )
  623.             (if (exists (tackon #oldmd2-dir #md2config-name))
  624.                (copyfiles
  625.                   (source #oldmd2-dir)
  626.                   (dest (tackon (tackon @default-dest #programs-dir) #md2-dir))
  627.                   (choices #md2config-name)
  628.                )
  629.             )
  630.          ))
  631.       ))  ; end duplicate old MD2
  632.    ))  ; end MD2 install
  633.  
  634.    ; V install
  635.    (if (IN #nc2progs-choice 01)
  636.    (
  637.       (copyfiles
  638.          (source #programs-dir)
  639.          (dest (tackon @default-dest #programs-dir))
  640.          (choices #vng-dir (cat #vng-dir ".info"))
  641.          (infos)
  642.       )
  643.  
  644.       ;duplicate old V components
  645.       (if (= 1 (askbool
  646.          (prompt "\nAs this is a new install of " #vng-dir ", it will be a generic installation.\n"
  647.                  "If you already use " #vng-dir " then you may wish to import your existing bookmarks file into this new version.\n"
  648.                  "\n\n\nWould you like to duplicate an existing " #vng-dir " bookmarks file?\n")
  649.          (help "If you have already installed and used " #vng-dir " then you will already have a file containing 'bookmarks' to your favourite sites on the web. "
  650.                "This file is compatible with this new installation of " #vng-dir ", so you may want the file copied for this new version.\n")
  651.          (default 1)))
  652.       (
  653.          (set #oldv-dir (askdir
  654.             (prompt "Please select where " #vng-dir " is installed. "
  655.                     "Enter the drawer where the program file can be found.")
  656.             (help "Find and enter the drawer of an existing installation of " #vng-dir ". "
  657.                   "You should be able to see the main 'Cache' and 'Voyager_home' drawers.")
  658.             (default #oldv-dir)))
  659.  
  660.          (if (exists (tackon #oldv-dir #vbook-name))
  661.             (copyfiles
  662.                (source #oldv-dir)
  663.                (dest (tackon (tackon @default-dest #programs-dir) #vng-dir))
  664.                (choices #vbook-name)
  665.             )
  666.          )
  667.       ))
  668.    ))
  669.  
  670.    ; AmFTP install
  671.    (if (IN #nc2progs-choice 02)
  672.    (
  673.       (copyfiles
  674.          (source #programs-dir)
  675.          (dest (tackon @default-dest #programs-dir))
  676.          (choices #amftp-dir (cat #amftp-dir ".info"))
  677.          (infos)
  678.       )
  679.    ))
  680.  
  681.    ; AmIRC install
  682.    (if (IN #nc2progs-choice 03)
  683.    (
  684.       (copyfiles
  685.          (source #programs-dir)
  686.          (dest (tackon @default-dest #programs-dir))
  687.          (choices #amirc-dir (cat #amirc-dir ".info"))
  688.          (infos)
  689.       )
  690.  
  691.       ;duplicate original AmIRC components
  692.       (if (= 1 (askbool
  693.          (prompt "\nAs this is a new install of " #amirc-dir ", it will be a generic installation.\n"
  694.                  "If you already use " #amirc-dir " then you may wish to import your existing configuration for this new version.\n"
  695.                  "\n\n\nWould you like to duplicate an existing " #amirc-dir " configuration file?\n")
  696.          (help "If you have already installed and used " #amirc-dir " then you will already have a file saving your own preferences. "
  697.                "This file is compatible with this new installation of " #amirc-dir ", so you may want the file copied for this new version.\n")
  698.          (default 1)))
  699.       (
  700.          ; ask for old AmIRC location
  701.          (set #oldamirc-dir (askdir
  702.             (prompt "Please select where " #amirc-dir " is installed. "
  703.                     "Enter the drawer where the program file can be found.")
  704.             (help "Find and enter the drawer of an existing installation of " #amirc-dir ". "
  705.                   "You should be able to see the main 'Rexx' drawer here.")
  706.             (default #oldamirc-dir)))
  707.  
  708.          (if (exists #oldamirc-dir)
  709.             (copyfiles
  710.                (source #oldamirc-dir)
  711.                (dest (tackon (tackon @default-dest "Programs/") #amirc-dir))
  712.                (choices #amircprefs-name)
  713.             )
  714.          )
  715.       ))
  716.    ))
  717.  
  718.    ; AmTalk install
  719.    (if (IN #nc2progs-choice 04)
  720.    (
  721.       (copyfiles
  722.          (source #programs-dir)
  723.          (dest (tackon @default-dest #programs-dir))
  724.          (choices #amtalk-dir (cat #amtalk-dir ".info"))
  725.          (infos)
  726.       )
  727.    ))
  728.  
  729.    ; AmTelnet install
  730.    (if (IN #nc2progs-choice 05)
  731.    (
  732.       (copyfiles
  733.          (source #programs-dir)
  734.          (dest (tackon @default-dest #programs-dir))
  735.          (choices #amtelnet-dir (cat #amtelnet-dir ".info"))
  736.          (infos)
  737.       )
  738.    ))
  739.  
  740.    ; NetInfo install
  741.    (if (IN #nc2progs-choice 06)
  742.    (
  743.       (copyfiles
  744.          (source #programs-dir)
  745.          (dest (tackon @default-dest #programs-dir))
  746.          (choices #netinfo-dir (cat #netinfo-dir ".info"))
  747.          (infos)
  748.       )
  749.    ))
  750.  
  751.    ; AmTerm install
  752.    (if (IN #nc2progs-choice 07)
  753.    (
  754.       (copyfiles
  755.          (source #programs-dir)
  756.          (dest (tackon @default-dest #programs-dir))
  757.          (choices #amterm-dir (cat #amterm-dir ".info"))
  758.          (infos)
  759.       )
  760.    ))
  761.  
  762.    ; X-Arc install
  763.    (if (IN #nc2progs-choice 08)
  764.    (
  765.       (copyfiles
  766.          (source #programs-dir)
  767.          (dest (tackon @default-dest #programs-dir))
  768.          (choices #xarc-dir (cat #xarc-dir ".info"))
  769.          (infos)
  770.       )
  771.       (copyfiles
  772.          (source (tackon #source-dir #env-dir))
  773.          (dest "envarc:")
  774.          (choices #xarc-arctype-name #xarc-config-name #xarc-filetype-name)
  775.       )
  776.       (copyfiles
  777.          (source (tackon #source-dir #env-dir))
  778.          (dest "env:")
  779.          (choices #xarc-arctype-name #xarc-config-name #xarc-filetype-name)
  780.       )
  781.    ))
  782.  
  783.    ; Contact Manager install
  784.    (if (IN #nc2progs-choice 09)
  785.    (
  786.       (copyfiles
  787.          (source #programs-dir)
  788.          (dest (tackon @default-dest #programs-dir))
  789.          (choices #cm-dir (cat #cm-dir ".info"))
  790.          (infos)
  791.       )
  792.  
  793.       (if (NOT (exists "envarc:Vapor"))
  794.          (makedir "envarc:Vapor")
  795.       )
  796.       (if (NOT (exists "env:Vapor"))
  797.          (makedir "env:Vapor")
  798.       )
  799.  
  800.       (textfile
  801.          (dest (tackon "envarc:Vapor" #cmanager-path-name))
  802.          (append (expandpath (tackon (tackon (tackon @default-dest #programs-dir) #cm-dir) "CManager")))
  803.       )
  804.       (textfile
  805.          (dest (tackon "env:Vapor" #cmanager-path-name))
  806.          (append (expandpath (tackon (tackon (tackon @default-dest #programs-dir) #cm-dir) "CManager")))
  807.       )
  808.    ))
  809.  
  810.    ; MIMEprefs install
  811.    (if (IN #nc2progs-choice 10)
  812.    (
  813.       (copyfiles
  814.          (source (tackon #source-dir #prefs-dir))
  815.          (dest "SYS:Prefs/")
  816.          (infos)
  817.          (all)
  818.       )
  819.       (copyfiles
  820.          (source (tackon #source-dir #env-dir))
  821.          (dest "envarc:")
  822.          (choices #mime-prefs-name)
  823.       )
  824.       (copyfiles
  825.          (source (tackon #source-dir #env-dir))
  826.          (dest "env:")
  827.          (choices #mime-prefs-name)
  828.       )
  829.    ))
  830. )
  831.  
  832.  
  833. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  834. (procedure install-nc-docs
  835.  
  836.    (transcript "installing nc docs")
  837.    (if (NOT (exists @default-dest))
  838.       (makedir @default-dest (infos))
  839.    )
  840.  
  841.    (copyfiles
  842.       (source #source-dir)
  843.       (dest @default-dest)
  844.       (choices #nc2docs-dir)
  845.       (infos)
  846.    )
  847. )
  848.  
  849.  
  850. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  851. ;;;
  852. ;;; Installatation sequence
  853. ;;;
  854. ;;;
  855.  
  856. (complete 00) (transcript "On making " app-name ".")
  857. (complete 01) (check-system-version)
  858. (complete 02) (check-old-assign)
  859.  
  860. (complete 05) (ask-install)
  861. (complete 07) (check-cpu-type)
  862. (if (NOT (= #nc2-choice 16))   ; if not only mui is installed
  863. (
  864.    (complete 10) (ask-dst-dir)
  865.    (complete 11) (add-nc2-assign)
  866.    (complete 15)
  867.    (if (OR (OR (IN #nc2-choice 00) (IN #nc2-choice 01)) (IN #nc2-choice 02))
  868.       (install-misc))
  869. ))
  870.  
  871. (complete 20) (if (IN #nc2-choice 00) (install-amitcp))
  872. (complete 30) (if (IN #nc2-choice 01) (install-nc-dock))
  873. (complete 40) (if (IN #nc2-choice 02) (install-nc-programs))
  874. (complete 60) (if (IN #nc2-choice 03) (install-nc-docs))
  875. (complete 80) (if (IN #nc2-choice 04) (install-mui))
  876. (complete 90) (if (NOT (= #nc2-choice 8)) (install-mcc))
  877.  
  878. (if (IN #nc2-choice 01)
  879. (
  880.    (if (= 1 (askbool
  881.       (prompt "\nWould you like to launch the NetConnect dock now ?\n"
  882.               "You will be asked to register yourself.\n");
  883.       (help "The NetConnect dock is a toolbar which allows you to launch"
  884.             "the NetConnect applications easily.")
  885.       (default 1)))
  886.    (
  887.       (run (cat "run " (tackon @default-dest #nc-name)))
  888.    ))
  889. ))
  890. (if (IN #nc2-choice 00)
  891. (
  892.    (if (= 1 (askbool
  893.       (prompt "\nWould you like to launch Genesis Wizard to configure the just installed Genesis ?\n")
  894.       (help "The Genesis Wizard will help you to configure Genesis for the first time with"
  895.             "little effort. We advise you to use the Wizard if you are unfamiliar with setting up a network.")
  896.       (default 1)))
  897.    (
  898.       (run "run AmiTCP:GenesisWizard")
  899.    ))
  900. ))
  901.  
  902. (complete 100)
  903.  
  904. ; added for CUCD distribution
  905. (makeassign 'NETCD2')
  906.  
  907.  
  908. ;; EOF
  909. ;;
  910.